package com.xiexuan.hearthstonecard;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

public class NewsDetail extends Activity {

	private ImageView iv_news_detail_title;
	private ImageView iv_news_detail_content;
	private TextView tv_news_detail_name;
	private TextView tv_news_detail_type;
	private TextView tv_news_detail_content;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.news_detail);

		iv_news_detail_title = (ImageView) findViewById(R.id.iv_news_detail_title);
		iv_news_detail_content = (ImageView) findViewById(R.id.iv_news_detail_content);
		tv_news_detail_content = (TextView) findViewById(R.id.tv_news_detail_content);
		tv_news_detail_name = (TextView) findViewById(R.id.tv_news_detail_name);
		tv_news_detail_type = (TextView) findViewById(R.id.tv_news_detail_type);

		Intent mIntent = getIntent();
		News news = (News) mIntent.getSerializableExtra("NEWS");

		iv_news_detail_title.setBackgroundResource(news.getDrawable_title());
		iv_news_detail_content
				.setBackgroundResource(news.getDrawable_content());
		tv_news_detail_content.setText(news.getContent());
		tv_news_detail_name.setText(news.getTitle());
		tv_news_detail_type.setText(news.getType());
	}
}
